package com.xmx.ndmallwxapi.feign;


import com.xmx.common.utils.R;
import com.xmx.ndmallwxapi.feign.factory.MallFallbackFatory;
import com.xmx.ndmallwxapi.feign.factory.PromotionFallbackFatory;
import com.xmx.ndmallwxapi.vo.mall.Storage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2021/8/11 11:25
 */
@FeignClient(value="mall-center",fallbackFactory = MallFallbackFatory.class)
public interface MallFeignClient {


    @GetMapping("mallcenter/topic/list")
    R malllist(@RequestParam Map<String, Object> params);

    @GetMapping("mallcenter/issue/list")
    R issuelist(@RequestParam Map<String, Object> params);

    /**
     * 文件存储服务
     * @param storage
     * @return
     */
    @PostMapping("/mallcenter/storage/save")
    R save(@RequestBody Storage storage);

    @GetMapping("/mallcenter/storage/findByKey")
     R findfileBykey(@RequestParam("key")String key);
}
